package com.ruoyi.common.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@Data
@ConfigurationProperties(prefix = "upload")
public class UploadConfig {
  private String rootUploadPath;
  private Long maximumFileSize;
  private String serverName;

  public String getAvatarPath() {
    return this.getRootUploadPath() + "avatar/";
  }
}
